﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RegistroMascotas.Presentacion;
using Microsoft.Reporting.WebForms;

namespace RegistroMascotas
{
    public partial class EjemploVisorReportes : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void btnCargar_Click(object sender, EventArgs e)
        {
            MascotaPresentacionBuilder builder = new MascotaPresentacionBuilder();
            List<MascotaPresentacion> mascotas = builder.TraerMascotasPorDia(DateTime.Parse("2013-01-01"));

            ReportViewer1.LocalReport.EnableExternalImages = true;
            ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsMisMascotas", mascotas));
        }
    }
}